home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-9.10-netbook-remix-PL.iso / casper / filesystem.squashfs / usr / share / doc / libdirectfb-1.2-0 / README.screenshots < prev    next >
Text File  |  2009-01-20  |  2KB  |  59 lines

  1. How to make DirectFB screenshots
  2. --------------------------------
  3.  
  4. There are two ways to generate DirectFB screenshots. The easy way is
  5. to set the "screenshot-dir" parameter in the DirectFB configuration
  6. file directfbrc or to pass it as a command-line option. See the
  7. directfbrc man-page for more details. You can then generate screen
  8. dumps in the PPM format by pressing the PrintScreen key.  The PPM
  9. files can easily be converted to others formats using for example the
  10. netpbm tools.
  11.  
  12. The hard way to do screenshots is to read directly from the frame
  13. buffer device. This works for all applications that use the frame
  14. buffer device, not only for DirectFB applications.
  15.  
  16. The resulting data is then converted to a more convenient format using
  17. the netpbm graphics conversion tools.  If the frame buffer is not
  18. running at 24 bit depth, the data has to be propagated to 24bit RGB
  19. before netpbm can handle it. The tools directory contains the source
  20. for two small utilities that do just this:
  21.  
  22.   raw16toraw24 is a small tool that reads 16bit RGB565 data from stdin,
  23.   converts to 24bit RGB888 data and writes it to stdout.
  24.  
  25.   raw15toraw24 is a small tool that reads 15bit RGB555 data from stdin,
  26.   converts to 24bit RGB888 data and writes it to stdout.
  27.  
  28.   raw32toraw24 is a small tool that reads 32bit ARGB data from stdin, 
  29.   converts to 24bit RGB888 data and writes it to stdout.
  30.  
  31.  
  32. The following steps have to be performed to take screenshots:
  33.  
  34. Step 1 - Log in from another computer using ssh or telnet. Start your 
  35.          application and stop it by pressing Ctrl+C in the remote
  36.      terminal.
  37.  
  38. Step 2 - Read data from /dev/fb0 and write it to a file.
  39.  
  40.  examples:
  41.   [15bit]  raw15toraw24 < /dev/fb0 > raw24.tmp
  42.   [16bit]  raw16toraw24 < /dev/fb0 > raw24.tmp
  43.   [24bit]  cat /dev/fb0 > raw24.tmp
  44.   [32bit]  raw32toraw24 < /dev/fb0 > raw24.tmp
  45.  
  46. Step 2 - Convert data to ppm using rawtoppm and specify the resolution of
  47.          the frame buffer.
  48.  
  49.  example:  rawtoppm 800 600 raw24.tmp > ppm24.tmp
  50.  
  51. Step 3 - Convert ppm to png using pnmtopng.
  52.  
  53.  example : pnmtopng <ppm24.tmp >screenshot.png
  54.  
  55.  
  56. Thats it!
  57.  
  58.  
  59.